package com.dubbo.todoit;

import com.alibaba.dubbo.common.extension.ExtensionLoader;
import com.dubbo.inter.SpiInterface;

/**
 * @author quanlong.chan
 * @Title: DubboSpi
 * @Description:
 * @date 2019/7/31 20:59
 */
public class DubboSpi {

    public static void main(String[] args) {

        ExtensionLoader<SpiInterface> extensionLoader = ExtensionLoader.getExtensionLoader(SpiInterface.class);

        SpiInterface tom = extensionLoader.getExtension("Tom");
        SpiInterface cat = extensionLoader.getExtension("Cat");

        tom.sayGoodBye("chan");
        cat.sayGoodBye("chan");
    }
}
